package com.ruoyi.system.mapper.honor;

import com.ruoyi.system.domain.honor.team.TeamHonor;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

/**
 * 团队荣誉Mapper接口
 * 
 * @author ruoyi
 * @date 2025-07-31
 */
public interface TeamHonorMapper 
{
    /**
     * 查询团队荣誉
     * 
     * @param id 团队荣誉主键
     * @return 团队荣誉
     */
    public TeamHonor selectTeamHonorById(Long id);

    /**
     * 查询团队荣誉列表
     * 
     * @param teamHonor 团队荣誉
     * @return 团队荣誉集合
     */
    public List<TeamHonor> selectTeamHonorList(TeamHonor teamHonor);

    /**
     * 新增团队荣誉
     * 
     * @param teamHonor 团队荣誉
     * @return 结果
     */
    public int insertTeamHonor(TeamHonor teamHonor);

    /**
     * 修改团队荣誉
     * 
     * @param teamHonor 团队荣誉
     * @return 结果
     */
    public int updateTeamHonor(TeamHonor teamHonor);

    /**
     * 删除团队荣誉
     * 
     * @param id 团队荣誉主键
     * @return 结果
     */
    public int deleteTeamHonorById(Long id);

    /**
     * 批量删除团队荣誉
     * 
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteTeamHonorByIds(Long[] ids);
    /**
     * 根据部门id和年份查询团队荣誉数量
     * @param deptId 部门id
     * @param year 年份
     * @return 数量
     */
    public int countByDeptIdAndYear(@Param("deptId") String deptId,@Param("year") String year);
    /**
     * 根据部门id和时间范围查询数量
     * @param deptId
     * @param year
     * @return
     */
    public int selectByCondition(@Param("startDate")Date startDate,@Param("endDate") Date endDate,@Param("deptId") Long deptId);
    /**
     * 根据年份查询数量
     * @param year
     * @return
     */
    public int getCountByYear(@Param("year")String year);

    int countByDeptIdAndYearBefore(String deptId);
}
